﻿using System;

namespace Program16
{
    public struct MyColor
    {
        public int red;
        public int green;
        public int blue;
      
    }
    #region
    //定义一个枚举类型
    public enum Gender
    {
        男,
        女
    }
    public struct Person//定义一个结构体
    {
        public string Name;
        public int Age;
        public Gender gender;
    }
    #endregion
    class Program
    {
        static void Main(string[] args)
        {
            MyColor mycolor;
            mycolor.red = 1;
            mycolor.green = 2;
            mycolor.blue = 3;

            Console.WriteLine(mycolor.red);
            Console.WriteLine("绿色值：" + mycolor.green);
            Console.WriteLine("蓝色值：" + mycolor.blue);

            #region 
            Person person1;
            person1.Name = "张三";
            person1.gender = Gender.男;
            person1.Age = 18;
            Person person2;
            person2.Name = "小兰";
            person2.gender = Gender.女;
            person2.Age = 16;          
            Console.WriteLine("{0},{1}岁,{2}", person1.Name, person1.Age, person1.gender);
            Console.WriteLine("{0},{1}岁,{2}", person2.Name, person2.Age, person2.gender);
            #endregion
        }
    }
}
